import abc

import six
from abc import ABCMeta, abstractmethod


# 相当于是java中的抽象类
class TradeStrategyBase(metaclass=abc.ABCMeta):

    def __init__(self, max_keep_duration, max_keep_stock_num):
        # 最长持有股票的时间
        self.max_keep_duration = max_keep_duration
        # 最大持有股票的数目
        self.max_keep_stock_num = max_keep_stock_num
        # 持有股票名称
        self.stock_names = []

    # 买入策略
    @abstractmethod
    def buy_strategy(self, **kwargs):
        pass

    # 卖出策略
    @abstractmethod
    def sell_strategy(self, **kwargs):
        pass
